package com.kc.business.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * TODO
 * 馆藏寄卖商品
 *
 * @author zhangshuo
 * @version 1.0
 * @date 2020/10/21
 */
@Data
@Table(name = "kc_platform_consignment_goods")
public class BizPlatformConsignmentGoods {
    private Integer id;
    @Id
    private Integer goodsId;
    /** 商品名称/标题 */
    @NotBlank(message = "商品名称不能为空")
    private String title;
    @NotBlank(message = "商品图片不能为空")
    private String thumb;
    /** 图片宽度*/
    private Integer imgWidth;
    /** 图片高度*/
    private Integer imgHeight;
    /** 材质 */
    private String material;
    /** 工艺 */
    private String technology;
    /** 技法 */
    private String technique;
    /** 规格 */
    private String specs;
    /** 产地 */
    private String origin;
    /** 描述 */
    private String description;
    @Min(0)
    @NotNull(message = "价格不能为空")
    private BigDecimal price;
    /** 标签 */
    private String tags;
    @Min(0)
    @NotNull(message = "库存不能为空")
    private Integer stock;
    /** 品类知识 */
    @NotBlank(message = "品类知识不能为空")
    private String knowledge;
    /** 细节图片 */
    @NotBlank(message = "细节图片不能为空")
    private String detailImg;
    /** 邮费 */
    @NotNull(message = "邮费不能为空")
    private Integer shippingFee;
    private String bannerList;
    private String bannerListAttr;
    /** 溯源视频地址 */
    private String videoUrl;
    /** 溯源视频封面图地址 */
    private String videoImg;
    /** 是否删除 0否1是*/
    private Integer isDeleted;
    @Transient
    private String[] bannerListArr;
    /*状态:1上架，0下架*/
    private Integer status;
    /*排序*/
    private Integer sort;
    @NotBlank(message = "发货地不能为空")
    private String goodsAddress;
    @NotNull(message = "推荐状态不能为空")
    private Integer isRecommend;
}
